﻿CREATE proc sp_dmdv_xoa
@MaDV char(10)
as
declare @dem as int
select @dem=count(*) from danhmuc_donvi where MaDV=@MaDV
if(@dem>0)
	begin
		delete from danhmuc_donvi where MaDV = @MaDV
		select ErrCode=1
	end
else
	begin
	select ErrCode=0
	end